package com.example.e_comm.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.e_comm.dto.PermissionDTO;
import com.example.e_comm.entity.Permission;


import java.util.List;
import java.util.Set;

public interface PermissionService extends IService<Permission> {
    boolean create(PermissionDTO dto);
    boolean remove(Long id);
    Permission get(Long id);
    List<Permission> getPermissionsByPage(Page<Permission> page);
    IPage<Permission> getPermissionsByPageWitchCondition(Page<Permission> page , String keyword);

    IPage<Permission> getPermissionsByPageWithCondition(Page<Permission> page, String keyword);

    List<Permission> getPermissionsByUserId(Long userId);
    List<Permission> getPermissionsByRoleId(Long roleId);
    Set<String> getPermissionsByUserIdSet(Long userId);
    Set<String> getPermissionsByRoleIdSet(Long roleId);


    IPage<Permission> getPermissionByPageWithCount(Page<Object> objectPage, String keyword);

    IPage<Permission> getPermissionsByPage(Page<Permission> page, String keyword);
}